import { Component } from '@angular/core';
import { NavController,ModalController } from 'ionic-angular';
import { RestProvider } from '../../providers/rest/rest';
import { GetweatherPage } from '../functionality/getweather/getweather';
@Component({
    selector: 'page-home',
    templateUrl: 'home.html'
})
export class HomePage {
    constructor(public navCtrl: NavController, public rest: RestProvider,public modalCtrl:ModalController) {}

    ionViewDidEnter() {
        console.log('ionViewDidLoad OpenpdfPage');
        // this.rest.weather('西安', '陕西').subscribe(
        //     (res) => {
        //         console.log(res);
        //     },
        //     (err) => {
        //         console.log(err);
        //     }
        // );
    }
    goPage(i){
      let url:any;
      switch(i){
        case 0: url=GetweatherPage;break;
      }
      let goPage=this.modalCtrl.create(url);
      goPage.present();
    }
}
